package ravenmocker.core;

import java.util.ArrayList;
import java.util.List;

public class Table implements IComponent {

	private String componentType = "TABLE";
	private String tableName;
	private List<Column> columns;
	
	public Table(String tableName) {
		this.columns = new ArrayList<Column>();
		this.tableName = tableName;
	}
	
	public void addColumn(Column column) {
		this.columns.add(column);
	}
	
	public void addColumn(String columnName, String type) {
		this.columns.add(new Column(columnName, type, this));
	}
	
	public void addColumn(String columnName, String type, int size) {
		this.columns.add(new Column(columnName, type, size, this));
	}
	
	public List<Column> getColumns() {
		return columns;
	}
	
	public String getTableName() {
		return this.tableName;
	}
	
	public String getComponentName() {
		return this.tableName;
	}
	
	public String getComponentType() {
		return this.componentType;
	}
	
}
